package com.winter.Controller;

import com.winter.model.Banner;
import com.winter.service.BannreService;
import com.winter.util.Result;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("v1/bannre")
public class BannreController {

    @Autowired
    private BannreService bannreService;


    @GetMapping
    public Result bannreList(String type) {
        List<Banner> banners = bannreService.bannreList(type);
        return Result.success(banners);
    }

}
